package wykop.analyze;

import wykop.page.WykopComment;

public class CommentScore implements ICommentFeature {

	private final int negative;
	private final int positive;

	public CommentScore(final int negative, final int positive) {
		super();
		this.negative = negative;
		this.positive = positive;
	}

	@Override
	public String forComment(final WykopComment comment) {
		if (comment.getScore() < negative) {
			return "NEGATIVE";
		} else if (comment.getScore() > positive) {
			return "POSITIVE";
		}
		return "NEUTRAL";
	}

	@Override
	public String name() {
		return "Score";
	}

	@Override
	public String type() {
		return "{NEGATIVE,NEUTRAL,POSITIVE}";
	}

}
